﻿(function(global) {
    var MBrowserUUid = {};
    MBrowserUUid.Evercookie = function(options) {
        this.init(options)
    };
    try { (function() {
            var document = window.document,
            Image = window.Image,
            globalStorage = window.globalStorage,
            swfobject = window.swfobject;
            try {
                var localStore = window.localStorage
            } catch(ex) {}
            try {
                var sessionStorage = window.sessionStorage
            } catch(e) {}
            function newImage(src) {
                var img = new Image();
                img.style.visibility = "hidden";
                img.style.position = "absolute";
                img.src = src
            }
            function _ec_replace(str, key, value) {
                if (str.indexOf("&" + key + "=") > -1 || str.indexOf(key + "=") === 0) {
                    var idx = str.indexOf("&" + key + "="),
                    end,
                    newstr;
                    if (idx === -1) {
                        idx = str.indexOf(key + "=")
                    }
                    end = str.indexOf("&", idx + 1);
                    if (end !== -1) {
                        newstr = str.substr(0, idx) + str.substr(end + (idx ? 0 : 1)) + "&" + key + "=" + value
                    } else {
                        newstr = str.substr(0, idx) + "&" + key + "=" + value
                    }
                    return newstr
                } else {
                    return str + "&" + key + "=" + value
                }
            }
            function idb() {
                if ("indexedDB" in window) {
                    return true
                } else {
                    if (window.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB) {
                        return true
                    } else {
                        return false
                    }
                }
            }
            var _global_lso;
            function _evercookie_flash_var(cookie) {
                _global_lso = cookie;
                var swf = document.getElementById("myswf");
                if (swf && swf.parentNode) {
                    swf.parentNode.removeChild(swf)
                }
            }
            var _global_isolated;
            function onSilverlightLoad(sender, args) {
                var control = sender.getHost();
                _global_isolated = control.Content.App.getIsolatedStorage()
            }
            function onSilverlightError(sender, args) {
                _global_isolated = ""
            }
            function HSTS_Cookie(domains) {
                var fields = [];
                var remaining = 0;
                var working = false;
                function create_request(i, src, callback) {
                    var img = document.createElement("img");
                    img.src = src + "#" + parseInt(Math.random() * 32000);
                    img.onload = function() {
                        fields[i] = true;
                        remaining -= 1;
                        if (remaining <= 0) {
                            working = false;
                            callback(fields)
                        }
                    };
                    img.onerror = function() {
                        fields[i] = false;
                        remaining -= 1;
                        if (remaining <= 0) {
                            working = false;
                            callback(fields)
                        }
                    };
                    return img
                }
                function pad(value, length) {
                    return (value.toString().length < length) ? pad("0" + value, length) : value
                }
                function bools_to_int(bools) {
                    var n = 0,
                    l = bools.length;
                    for (var i = 0; i < l; ++i) {
                        n = (n << 1) + (bools[i] ? 1 : 0)
                    }
                    return n
                }
                function int_to_bools(value, bit_count) {
                    var bools = [];
                    var bits = parseInt(value, 10).toString(2);
                    bits = pad(bits, 32);
                    for (var i = 32 - bit_count; i < 32; ++i) {
                        bools.push(bits[i] == "1" ? true: false)
                    }
                    return bools
                }
                return {
                    bools_to_int: bools_to_int,
                    is_working: function() {
                        return working
                    },
                    get_hsts_value: function(callback) {
                        if (working) {
                            return false
                        }
                        working = true;
                        fields = [];
                        remaining = domains.length;
                        for (var i = 0; i < domains.length; ++i) {
                            fields.push(undefined);
                            var img = create_request(i, domains[i], callback)
                        }
                        return true
                    },
                    set_hsts_value: function(values, callback) {
                        if (working) {
                            return false
                        }
                        working = true;
                        fields = [];
                        remaining = domains.length;
                        for (var i = 0; i < domains.length; ++i) {
                            fields.push(undefined);
                            if (values[i]) {
                                create_request(i, domains[i] + "?SET=1", callback)
                            } else {
                                create_request(i, domains[i] + "?DEL=1", callback)
                            }
                        }
                        return true
                    },
                    set_hsts_as_int: function(value, callback) {
                        var value = int_to_bools(value, domains.length);
                        return this.set_hsts_value(value, callback)
                    },
                    get_hsts_as_int: function(callback) {
                        return this.get_hsts_value(function(fields) {
                            callback(bools_to_int(fields))
                        })
                    }
                }
            }
            var defaultOptionMap = {
                history: true,
                java: true,
                tests: 10,
                silverlight: true,
                domain: "." + window.location.host.replace(/:\d+/, ""),
                baseurl: "",
                asseturi: "/assets",
                phpuri: "/php",
                authPath: false,
                pngCookieName: "evercookie_png",
                pngPath: "/evercookie_png.php",
                etagCookieName: "evercookie_etag",
                etagPath: "/evercookie_etag.php",
                cacheCookieName: "evercookie_cache",
                cachePath: "/evercookie_cache.php",
                hsts: false,
                hsts_domains: []
            };
            var _baseKeyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
            MBrowserUUid.Evercookie.prototype = {
                init: function(options) {
                    options = options || {};
                    var opts = {};
                    for (var key in defaultOptionMap) {
                        var optValue = options[key];
                        if (typeof optValue !== "undefined") {
                            opts[key] = optValue
                        } else {
                            opts[key] = defaultOptionMap[key]
                        }
                    }
                    if (typeof opts.domain === "function") {
                        opts.domain = opts.domain(window)
                    }
                    var _ec_history = opts.history,
                    _ec_java = opts.java,
                    _ec_tests = opts.tests,
                    _ec_baseurl = opts.baseurl,
                    _ec_asseturi = opts.asseturi,
                    _ec_phpuri = opts.phpuri,
                    _ec_domain = opts.domain,
                    _ec_hsts = opts.hsts;
                    var self = this;
                    this._ec = {};
                    if (_ec_hsts) {
                        if (opts.hsts_domains.length <= 8) {
                            console.log("HSTS cookie with " + opts.hsts_domains.length + " can only save values up to " + Math.pow(2, opts.hsts_domains.length) - 1)
                        }
                        this.hsts_cookie = HSTS_Cookie(opts.hsts_domains)
                    }
                    this.get = function(name, cb, dont_reset) {
                        self._evercookie(name, cb, undefined, undefined, dont_reset)
                    };
                    this.set = function(name, value) {
                        self._evercookie(name,
                        function() {},
                        value)
                    };
                    this._evercookie = function(name, cb, value, i, dont_reset) {
                        if (self._evercookie === undefined) {
                            self = this
                        }
                        if (i === undefined) {
                            i = 0
                        }
                        if (i === 0) {
                            self.evercookie_database_storage(name, value);
                            self.evercookie_indexdb_storage(name, value);
                            if (opts.authPath) {
                                self.evercookie_auth(name, value)
                            }
                            if (_ec_java) {
                                self.evercookie_java(name, value)
                            }
                            self._ec.userData = self.evercookie_userdata(name, value);
                            self._ec.cookieData = self.evercookie_cookie(name, value);
                            self._ec.localData = self.evercookie_local_storage(name, value);
                            self._ec.globalData = self.evercookie_global_storage(name, value);
                            self._ec.sessionData = self.evercookie_session_storage(name, value);
                            self._ec.windowData = self.evercookie_window(name, value);
                            if (_ec_hsts) {
                                self._ec.hstsData = undefined;
                                if (value === undefined) {
                                    self.hsts_cookie.get_hsts_as_int(function(int_val) {
                                        self._ec.hstsData = int_val
                                    })
                                } else {
                                    self.hsts_cookie.set_hsts_as_int(value,
                                    function(val) {
                                        self._ec.hstsData = self.hsts_cookie.bools_to_int(val)
                                    })
                                }
                            }
                        }
                        if (value !== undefined) {
                            if ((typeof _global_lso === "undefined" || typeof _global_isolated === "undefined" || self._ec.hstsData === undefined || self.hsts_cookie.is_working()) && i++<_ec_tests) {
                                setTimeout(function() {
                                    self._evercookie(name, cb, value, i, dont_reset)
                                },
                                300)
                            }
                        } else {
                            if (((window.openDatabase && typeof self._ec.dbData === "undefined") || (idb() && (typeof self._ec.idbData === "undefined" || self._ec.idbData === "")) || (typeof _global_lso === "undefined") || (typeof self._ec.etagData === "undefined") || (typeof self._ec.cacheData === "undefined") || (typeof self._ec.javaData === "undefined") || (self._ec.hstsData === undefined || self.hsts_cookie.is_working()) || (document.createElement("canvas").getContext && (typeof self._ec.pngData === "undefined" || self._ec.pngData === "")) || (typeof _global_isolated === "undefined")) && i++<_ec_tests) {
                                setTimeout(function() {
                                    self._evercookie(name, cb, value, i, dont_reset)
                                },
                                300)
                            } else {
                                self._ec.lsoData = self.getFromStr(name, _global_lso);
                                _global_lso = undefined;
                                self._ec.slData = self.getFromStr(name, _global_isolated);
                                _global_isolated = undefined;
                                var tmpec = self._ec,
                                candidates = [],
                                bestnum = 0,
                                candidate,
                                item;
                                self._ec = {};
                                for (item in tmpec) {
                                    if (tmpec[item] && tmpec[item] !== "null" && tmpec[item] !== "undefined") {
                                        candidates[tmpec[item]] = candidates[tmpec[item]] === undefined ? 1 : candidates[tmpec[item]] + 1
                                    }
                                }
                                for (item in candidates) {
                                    if (candidates[item] > bestnum) {
                                        bestnum = candidates[item];
                                        candidate = item
                                    }
                                }
                                this.working = false;
                                if (candidate !== undefined && (dont_reset === undefined || dont_reset !== 1)) {
                                    self.set(name, candidate)
                                }
                                if (typeof cb === "function") {
                                    cb(candidate, tmpec)
                                }
                            }
                        }
                    };
                    this.evercookie_window = function(name, value) {
                        try {
                            if (value !== undefined) {
                                window.name = _ec_replace(window.name, name, value)
                            } else {
                                return this.getFromStr(name, window.name)
                            }
                        } catch(e) {}
                    };
                    this.evercookie_userdata = function(name, value) {
                        try {
                            var elm = this.createElem("div", "userdata_el", 1);
                            if (elm.addBehavior) {
                                elm.style.behavior = "url(#default#userData)";
                                if (value !== undefined) {
                                    elm.setAttribute(name, value);
                                    elm.save(name)
                                } else {
                                    elm.load(name);
                                    return elm.getAttribute(name)
                                }
                            }
                        } catch(e) {}
                    };
                    this.ajax = function(settings) {};
                    this.evercookie_cache = function(name, value) {
                        if (value !== undefined) {
                            document.cookie = opts.cacheCookieName + "=" + value + "; path=/; domain=" + _ec_domain;
                            self.ajax({
                                url: _ec_baseurl + _ec_phpuri + opts.cachePath + "?name=" + name + "&cookie=" + opts.cacheCookieName,
                                success: function(data) {}
                            })
                        } else {
                            var origvalue = this.getFromStr(opts.cacheCookieName, document.cookie);
                            self._ec.cacheData = undefined;
                            document.cookie = opts.cacheCookieName + "=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/; domain=" + _ec_domain;
                            self.ajax({
                                url: _ec_baseurl + _ec_phpuri + opts.cachePath + "?name=" + name + "&cookie=" + opts.cacheCookieName,
                                success: function(data) {
                                    document.cookie = opts.cacheCookieName + "=" + origvalue + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/; domain=" + _ec_domain;
                                    self._ec.cacheData = data
                                }
                            })
                        }
                    };
                    this.evercookie_auth = function(name, value) {
                        if (value !== undefined) {
                            newImage("//" + value + "@" + location.host + _ec_baseurl + _ec_phpuri + opts.authPath + "?name=" + name)
                        } else {
                            self.ajax({
                                url: _ec_baseurl + _ec_phpuri + opts.authPath + "?name=" + name,
                                success: function(data) {
                                    self._ec.authData = data
                                }
                            })
                        }
                    };
                    this.evercookie_etag = function(name, value) {
                        if (value !== undefined) {
                            document.cookie = opts.etagCookieName + "=" + value + "; path=/; domain=" + _ec_domain;
                            self.ajax({
                                url: _ec_baseurl + _ec_phpuri + opts.etagPath + "?name=" + name + "&cookie=" + opts.etagCookieName,
                                success: function(data) {}
                            })
                        } else {
                            var origvalue = this.getFromStr(opts.etagCookieName, document.cookie);
                            self._ec.etagData = undefined;
                            document.cookie = opts.etagCookieName + "=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/; domain=" + _ec_domain;
                            self.ajax({
                                url: _ec_baseurl + _ec_phpuri + opts.etagPath + "?name=" + name + "&cookie=" + opts.etagCookieName,
                                success: function(data) {
                                    document.cookie = opts.etagCookieName + "=" + origvalue + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/; domain=" + _ec_domain;
                                    self._ec.etagData = data
                                }
                            })
                        }
                    };
                    this.evercookie_java = function(name, value) {
                        var div = document.getElementById("ecAppletContainer");
                        if (typeof dtjava === "undefined") {
                            return
                        }
                        if (div === null || div === undefined || !div.length) {
                            div = document.createElement("div");
                            div.setAttribute("id", "ecAppletContainer");
                            div.style.position = "absolute";
                            div.style.top = "-3000px";
                            div.style.left = "-3000px";
                            div.style.width = "1px";
                            div.style.height = "1px";
                            document.body.appendChild(div)
                        }
                        if (typeof ecApplet === "undefined") {
                            dtjava.embed({
                                id: "ecApplet",
                                url: _ec_baseurl + _ec_asseturi + "/m_uuid_web.jnlp",
                                width: "1px",
                                height: "1px",
                                placeholder: "ecAppletContainer"
                            },
                            {},
                            {
                                onJavascriptReady: doSetOrGet
                            })
                        } else {
                            doSetOrGet("ecApplet")
                        }
                        function doSetOrGet(appletId) {
                            var applet = document.getElementById(appletId);
                            if (value !== undefined) {
                                applet.set(name, value)
                            } else {
                                self._ec.javaData = applet.get(name)
                            }
                        }
                    };
                    this.evercookie_lso = function(name, value) {
                        var div = document.getElementById("swfcontainer"),
                        flashvars = {},
                        params = {},
                        attributes = {};
                        if (div === null || div === undefined || !div.length) {
                            div = document.createElement("div");
                            div.setAttribute("id", "swfcontainer");
                            document.body.appendChild(div)
                        }
                        if (value !== undefined) {
                            flashvars.everdata = name + "=" + value
                        }
                        params.swliveconnect = "true";
                        attributes.id = "myswf";
                        attributes.name = "myswf";
                        swfobject.embedSWF(_ec_baseurl + _ec_asseturi + "/m_uuid_web.swf", "swfcontainer", "1", "1", "9.0.0", false, flashvars, params, attributes)
                    };
                    this.evercookie_png = function(name, value) {
                        var canvas = document.createElement("canvas"),
                        img,
                        ctx,
                        origvalue;
                        canvas.style.visibility = "hidden";
                        canvas.style.position = "absolute";
                        canvas.width = 200;
                        canvas.height = 1;
                        if (canvas && canvas.getContext) {
                            img = new Image();
                            img.style.visibility = "hidden";
                            img.style.position = "absolute";
                            if (value !== undefined) {
                                document.cookie = opts.pngCookieName + "=" + value + "; path=/; domain=" + _ec_domain
                            } else {
                                self._ec.pngData = undefined;
                                ctx = canvas.getContext("2d");
                                origvalue = this.getFromStr(opts.pngCookieName, document.cookie);
                                document.cookie = opts.pngCookieName + "=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/; domain=" + _ec_domain;
                                img.onload = function() {
                                    document.cookie = opts.pngCookieName + "=" + origvalue + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/; domain=" + _ec_domain;
                                    self._ec.pngData = "";
                                    ctx.drawImage(img, 0, 0);
                                    var imgd = ctx.getImageData(0, 0, 200, 1),
                                    pix = imgd.data,
                                    i,
                                    n;
                                    for (i = 0, n = pix.length; i < n; i += 4) {
                                        if (pix[i] === 0) {
                                            break
                                        }
                                        self._ec.pngData += String.fromCharCode(pix[i]);
                                        if (pix[i + 1] === 0) {
                                            break
                                        }
                                        self._ec.pngData += String.fromCharCode(pix[i + 1]);
                                        if (pix[i + 2] === 0) {
                                            break
                                        }
                                        self._ec.pngData += String.fromCharCode(pix[i + 2])
                                    }
                                }
                            }
                            img.src = _ec_baseurl + _ec_phpuri + opts.pngPath + "?name=" + name + "&cookie=" + opts.pngCookieName;
                            img.crossOrigin = "Anonymous"
                        }
                    };
                    this.evercookie_local_storage = function(name, value) {
                        try {
                            if (localStore) {
                                if (value !== undefined) {
                                    localStore.setItem(name, value)
                                } else {
                                    return localStore.getItem(name)
                                }
                            }
                        } catch(e) {}
                    };
                    this.evercookie_database_storage = function(name, value) {
                        try {
                            if (window.openDatabase) {
                                var database = window.openDatabase("m_uuid_web_db", "", "m_web", 1024 * 1024);
                                if (value !== undefined) {
                                    database.transaction(function(tx) {
                                        tx.executeSql("CREATE TABLE IF NOT EXISTS cache(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, value TEXT NOT NULL, UNIQUE (name))", [],
                                        function(tx, rs) {},
                                        function(tx, err) {});
                                        tx.executeSql("INSERT OR REPLACE INTO cache(name, value) VALUES(?, ?)", [name, value],
                                        function(tx, rs) {},
                                        function(tx, err) {})
                                    })
                                } else {
                                    database.transaction(function(tx) {
                                        tx.executeSql("SELECT value FROM cache WHERE name=?", [name],
                                        function(tx, result1) {
                                            if (result1.rows.length >= 1) {
                                                self._ec.dbData = result1.rows.item(0).value
                                            } else {
                                                self._ec.dbData = ""
                                            }
                                        },
                                        function(tx, err) {})
                                    })
                                }
                            }
                        } catch(e) {}
                    };
                    this.evercookie_indexdb_storage = function(name, value) {
                        try {
                            if (! ("indexedDB" in window)) {
                                indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
                                IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBTransaction;
                                IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange || window.msIDBKeyRange
                            }
                            if (indexedDB) {
                                var ver = 1;
                                var request = indexedDB.open("m_uuid_web", ver);
                                request.onerror = function(e) {};
                                request.onupgradeneeded = function(event) {
                                    var db = event.target.result;
                                    var store = db.createObjectStore("m_uuid_web", {
                                        keyPath: "name",
                                        unique: false
                                    })
                                };
                                if (value !== undefined) {
                                    request.onsuccess = function(event) {
                                        var idb = event.target.result;
                                        if (idb.objectStoreNames.contains("m_uuid_web")) {
                                            var tx = idb.transaction(["m_uuid_web"], "readwrite");
                                            var objst = tx.objectStore("m_uuid_web");
                                            var qr = objst.put({
                                                name: name,
                                                value: value
                                            })
                                        }
                                        idb.close()
                                    }
                                } else {
                                    request.onsuccess = function(event) {
                                        var idb = event.target.result;
                                        if (!idb.objectStoreNames.contains("m_uuid_web")) {
                                            self._ec.idbData = undefined
                                        } else {
                                            var tx = idb.transaction(["m_uuid_web"]);
                                            var objst = tx.objectStore("m_uuid_web");
                                            var qr = objst.get(name);
                                            qr.onsuccess = function(event) {
                                                if (qr.result === undefined) {
                                                    self._ec.idbData = undefined
                                                } else {
                                                    self._ec.idbData = qr.result.value
                                                }
                                            }
                                        }
                                        idb.close()
                                    }
                                }
                            }
                        } catch(e) {}
                    };
                    this.evercookie_session_storage = function(name, value) {
                        try {
                            if (sessionStorage) {
                                if (value !== undefined) {
                                    sessionStorage.setItem(name, value)
                                } else {
                                    return sessionStorage.getItem(name)
                                }
                            }
                        } catch(e) {}
                    };
                    this.evercookie_global_storage = function(name, value) {
                        if (globalStorage) {
                            var host = this.getHost();
                            try {
                                if (value !== undefined) {
                                    globalStorage[host][name] = value
                                } else {
                                    return globalStorage[host][name]
                                }
                            } catch(e) {}
                        }
                    };
                    this.evercookie_silverlight = function(name, value) {
                        var source = _ec_baseurl + _ec_asseturi + "/m_uuid_web.xap",
                        minver = "4.0.50401.0",
                        initParam = "",
                        html;
                        if (value !== undefined) {
                            initParam = '<param name="initParams" value="' + name + "=" + value + '" />'
                        }
                        html = '<object style="position:absolute;left:-500px;top:-500px" data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="mysilverlight" width="0" height="0">' + initParam + '<param name="source" value="' + source + '"/><param name="onLoad" value="onSilverlightLoad"/><param name="onError" value="onSilverlightError"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="minRuntimeVersion" value="' + minver + '"/><param name="autoUpgrade" value="false"/><a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=' + minver + '" style="display:none">Get Microsoft Silverlight</a></object>';
                        try {
                            if (typeof jQuery === "undefined") {
                                document.body.appendChild(html)
                            } else {
                                $("body").append(html)
                            }
                        } catch(ex) {}
                    };
                    this.encode = function(input) {
                        var output = "",
                        chr1, chr2, chr3, enc1, enc2, enc3, enc4, i = 0;
                        input = this._utf8_encode(input);
                        while (i < input.length) {
                            chr1 = input.charCodeAt(i++);
                            chr2 = input.charCodeAt(i++);
                            chr3 = input.charCodeAt(i++);
                            enc1 = chr1 >> 2;
                            enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                            enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                            enc4 = chr3 & 63;
                            if (isNaN(chr2)) {
                                enc3 = enc4 = 64
                            } else {
                                if (isNaN(chr3)) {
                                    enc4 = 64
                                }
                            }
                            output = output + _baseKeyStr.charAt(enc1) + _baseKeyStr.charAt(enc2) + _baseKeyStr.charAt(enc3) + _baseKeyStr.charAt(enc4)
                        }
                        return output
                    };
                    this.decode = function(input) {
                        var output = "",
                        chr1, chr2, chr3, enc1, enc2, enc3, enc4, i = 0;
                        input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
                        while (i < input.length) {
                            enc1 = _baseKeyStr.indexOf(input.charAt(i++));
                            enc2 = _baseKeyStr.indexOf(input.charAt(i++));
                            enc3 = _baseKeyStr.indexOf(input.charAt(i++));
                            enc4 = _baseKeyStr.indexOf(input.charAt(i++));
                            chr1 = (enc1 << 2) | (enc2 >> 4);
                            chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
                            chr3 = ((enc3 & 3) << 6) | enc4;
                            output = output + String.fromCharCode(chr1);
                            if (enc3 !== 64) {
                                output = output + String.fromCharCode(chr2)
                            }
                            if (enc4 !== 64) {
                                output = output + String.fromCharCode(chr3)
                            }
                        }
                        output = this._utf8_decode(output);
                        return output
                    };
                    this._utf8_encode = function(str) {
                        str = str.replace(/\r\n/g, "\n");
                        var utftext = "",
                        i = 0,
                        n = str.length,
                        c;
                        for (; i < n; i++) {
                            c = str.charCodeAt(i);
                            if (c < 128) {
                                utftext += String.fromCharCode(c)
                            } else {
                                if ((c > 127) && (c < 2048)) {
                                    utftext += String.fromCharCode((c >> 6) | 192);
                                    utftext += String.fromCharCode((c & 63) | 128)
                                } else {
                                    utftext += String.fromCharCode((c >> 12) | 224);
                                    utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                                    utftext += String.fromCharCode((c & 63) | 128)
                                }
                            }
                        }
                        return utftext
                    };
                    this._utf8_decode = function(utftext) {
                        var str = "",
                        i = 0,
                        n = utftext.length,
                        c = 0,
                        c1 = 0,
                        c2 = 0,
                        c3 = 0;
                        while (i < n) {
                            c = utftext.charCodeAt(i);
                            if (c < 128) {
                                str += String.fromCharCode(c);
                                i += 1
                            } else {
                                if ((c > 191) && (c < 224)) {
                                    c2 = utftext.charCodeAt(i + 1);
                                    str += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
                                    i += 2
                                } else {
                                    c2 = utftext.charCodeAt(i + 1);
                                    c3 = utftext.charCodeAt(i + 2);
                                    str += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                                    i += 3
                                }
                            }
                        }
                        return str
                    };
                    this.evercookie_history = function(name, value) {
                        var baseElems = (_baseKeyStr + "-").split(""),
                        url = "http://www.google.com/evercookie/cache/" + this.getHost() + "/" + name,
                        i,
                        base,
                        letter = "",
                        val = "",
                        found = 1;
                        if (value !== undefined) {
                            if (this.hasVisited(url)) {
                                return
                            }
                            this.createIframe(url, "if");
                            url = url + "/";
                            base = this.encode(value).split("");
                            for (i = 0; i < base.length; i++) {
                                url = url + base[i];
                                this.createIframe(url, "if" + i)
                            }
                            url = url + "-";
                            this.createIframe(url, "if_")
                        } else {
                            if (this.hasVisited(url)) {
                                url = url + "/";
                                while (letter !== "-" && found === 1) {
                                    found = 0;
                                    for (i = 0; i < baseElems.length; i++) {
                                        if (this.hasVisited(url + baseElems[i])) {
                                            letter = baseElems[i];
                                            if (letter !== "-") {
                                                val = val + letter
                                            }
                                            url = url + letter;
                                            found = 1;
                                            break
                                        }
                                    }
                                }
                                return this.decode(val)
                            }
                        }
                    };
                    this.createElem = function(type, name, append) {
                        var el;
                        if (name !== undefined && document.getElementById(name)) {
                            el = document.getElementById(name)
                        } else {
                            el = document.createElement(type)
                        }
                        el.style.visibility = "hidden";
                        el.style.position = "absolute";
                        if (name) {
                            el.setAttribute("id", name)
                        }
                        if (append) {
                            document.body.appendChild(el)
                        }
                        return el
                    };
                    this.createIframe = function(url, name) {
                        var el = this.createElem("iframe", name, 1);
                        el.setAttribute("src", url);
                        return el
                    };
                    var waitForSwf = this.waitForSwf = function(i) {
                        if (i === undefined) {
                            i = 0
                        } else {
                            i++
                        }
                        if (i < _ec_tests && typeof swfobject === "undefined") {
                            setTimeout(function() {
                                waitForSwf(i)
                            },
                            300)
                        }
                    };
                    this.evercookie_cookie = function(name, value) {
                        if (value !== undefined) {
                            document.cookie = name + "=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/; domain=" + _ec_domain;
                            document.cookie = name + "=" + value + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/; domain=" + _ec_domain
                        } else {
                            return this.getFromStr(name, document.cookie)
                        }
                    };
                    this.getFromStr = function(name, text) {
                        if (typeof text !== "string") {
                            return
                        }
                        var nameEQ = name + "=",
                        ca = text.split(/[;&]/),
                        i,
                        c;
                        for (i = 0; i < ca.length; i++) {
                            c = ca[i];
                            while (c.charAt(0) === " ") {
                                c = c.substring(1, c.length)
                            }
                            if (c.indexOf(nameEQ) === 0) {
                                return c.substring(nameEQ.length, c.length)
                            }
                        }
                    };
                    this.getHost = function() {
                        return window.location.host.replace(/:\d+/, "")
                    };
                    this.toHex = function(str) {
                        var r = "",
                        e = str.length,
                        c = 0,
                        h;
                        while (c < e) {
                            h = str.charCodeAt(c++).toString(16);
                            while (h.length < 2) {
                                h = "0" + h
                            }
                            r += h
                        }
                        return r
                    };
                    this.fromHex = function(str) {
                        var r = "",
                        e = str.length,
                        s;
                        while (e >= 0) {
                            s = e - 2;
                            r = String.fromCharCode("0x" + str.substring(s, e)) + r;
                            e = s
                        }
                        return r
                    };
                    this.hasVisited = function(url) {
                        if (this.no_color === -1) {
                            var no_style = this._getRGB("http://samy-was-here-this-should-never-be-visited.com", -1);
                            if (no_style === -1) {
                                this.no_color = this._getRGB("http://samy-was-here-" + Math.floor(Math.random() * 9999999) + "rand.com")
                            }
                        }
                        if (url.indexOf("https:") === 0 || url.indexOf("http:") === 0) {
                            return this._testURL(url, this.no_color)
                        }
                        return this._testURL("http://" + url, this.no_color) || this._testURL("https://" + url, this.no_color) || this._testURL("http://www." + url, this.no_color) || this._testURL("https://www." + url, this.no_color)
                    };
                    var _link = this.createElem("a", "_ec_rgb_link"),
                    created_style,
                    _cssText = "#_ec_rgb_link:visited{display:none;color:#FF0000}",
                    style;
                    try {
                        created_style = 1;
                        style = document.createElement("style");
                        if (style.styleSheet) {
                            style.styleSheet.innerHTML = _cssText
                        } else {
                            if (style.innerHTML) {
                                style.innerHTML = _cssText
                            } else {
                                style.appendChild(document.createTextNode(_cssText))
                            }
                        }
                    } catch(e) {
                        created_style = 0
                    }
                    this._getRGB = function(u, test_color) {
                        if (test_color && created_style === 0) {
                            return - 1
                        }
                        _link.href = u;
                        _link.innerHTML = u;
                        document.body.appendChild(style);
                        document.body.appendChild(_link);
                        var color;
                        if (document.defaultView) {
                            if (document.defaultView.getComputedStyle(_link, null) == null) {
                                return - 1
                            }
                            color = document.defaultView.getComputedStyle(_link, null).getPropertyValue("color")
                        } else {
                            color = _link.currentStyle.color
                        }
                        return color
                    };
                    this._testURL = function(url, no_color) {
                        var color = this._getRGB(url);
                        if (color === "rgb(255, 0, 0)" || color === "#ff0000") {
                            return 1
                        } else {
                            if (no_color && color !== no_color) {
                                return 1
                            }
                        }
                        return 0
                    }
                }
            }
        } ())
    } catch(ex) {}
    if (!Array.prototype.indexOf) {
        Array.prototype.indexOf = function(searchElement, fromIndex) {
            var k;
            if (this == null) {
                throw new TypeError("'this' is null or undefined")
            }
            var O = Object(this);
            var len = O.length >>> 0;
            if (len === 0) {
                return - 1
            }
            var n = +fromIndex || 0;
            if (Math.abs(n) === Infinity) {
                n = 0
            }
            if (n >= len) {
                return - 1
            }
            k = Math.max(n >= 0 ? n: len - Math.abs(n), 0);
            while (k < len) {
                if (k in O && O[k] === searchElement) {
                    return k
                }
                k++
            }
            return - 1
        }
    }
    MBrowserUUid.Fingerprint2 = function(options) {
        var defaultOptions = {
            swfContainerId: "fingerprintjs2",
            swfPath: "flash/compiled/FontList.swf",
            detectScreenOrientation: true,
            sortPluginsFor: [/palemoon/i]
        };
        this.options = this.extend(options, defaultOptions);
        this.nativeForEach = Array.prototype.forEach;
        this.nativeMap = Array.prototype.map
    };
    MBrowserUUid.Fingerprint2.prototype = {
        extend: function(source, target) {
            if (source == null) {
                return target
            }
            for (var k in source) {
                if (source[k] != null && target[k] !== source[k]) {
                    target[k] = source[k]
                }
            }
            return target
        },
        log: function(msg) {
            if (window.console) {
                console.log(msg)
            }
        },
        get: function(done) {
            var keys = [];
            keys = this.userAgentKey(keys);
            keys = this.languageKey(keys);
            keys = this.colorDepthKey(keys);
            keys = this.pixelRatioKey(keys);
            keys = this.screenResolutionKey(keys);
            keys = this.availableScreenResolutionKey(keys);
            keys = this.timezoneOffsetKey(keys);
            keys = this.sessionStorageKey(keys);
            keys = this.localStorageKey(keys);
            keys = this.indexedDbKey(keys);
            keys = this.addBehaviorKey(keys);
            keys = this.openDatabaseKey(keys);
            keys = this.cpuClassKey(keys);
            keys = this.platformKey(keys);
            keys = this.doNotTrackKey(keys);
            keys = this.pluginsKey(keys);
            keys = this.canvasKey(keys);
            keys = this.webglKey(keys);
            keys = this.adBlockKey(keys);
            keys = this.hasLiedLanguagesKey(keys);
            keys = this.hasLiedResolutionKey(keys);
            keys = this.hasLiedOsKey(keys);
            keys = this.hasLiedBrowserKey(keys);
            keys = this.touchSupportKey(keys);
            var that = this;
            this.fontsKey(keys,
            function(newKeys) {
                var values = [];
                that.each(newKeys,
                function(pair) {
                    var value = pair.value;
                    if (typeof pair.value.join !== "undefined") {
                        value = pair.value.join(";")
                    }
                    values.push(value)
                });
                var murmur = that.x64hash128(values.join("~~~"), 31);
                return done(murmur, newKeys)
            })
        },
        userAgentKey: function(keys) {
            if (!this.options.excludeUserAgent) {
                keys.push({
                    key: "user_agent",
                    value: this.getUserAgent()
                })
            }
            return keys
        },
        getUserAgent: function() {
            return navigator.userAgent
        },
        languageKey: function(keys) {
            if (!this.options.excludeLanguage) {
                keys.push({
                    key: "language",
                    value: navigator.language || navigator.userLanguage || navigator.browserLanguage || navigator.systemLanguage || ""
                })
            }
            return keys
        },
        colorDepthKey: function(keys) {
            if (!this.options.excludeColorDepth) {
                keys.push({
                    key: "color_depth",
                    value: screen.colorDepth
                })
            }
            return keys
        },
        pixelRatioKey: function(keys) {
            if (!this.options.excludePixelRatio) {
                keys.push({
                    key: "pixel_ratio",
                    value: this.getPixelRatio()
                })
            }
            return keys
        },
        getPixelRatio: function() {
            return window.devicePixelRatio || ""
        },
        screenResolutionKey: function(keys) {
            if (!this.options.excludeScreenResolution) {
                return this.getScreenResolution(keys)
            }
            return keys
        },
        getScreenResolution: function(keys) {
            var resolution;
            if (this.options.detectScreenOrientation) {
                resolution = (screen.height > screen.width) ? [screen.height, screen.width] : [screen.width, screen.height]
            } else {
                resolution = [screen.width, screen.height]
            }
            if (typeof resolution !== "undefined") {
                keys.push({
                    key: "resolution",
                    value: resolution
                })
            }
            return keys
        },
        availableScreenResolutionKey: function(keys) {
            if (!this.options.excludeAvailableScreenResolution) {
                return this.getAvailableScreenResolution(keys)
            }
            return keys
        },
        getAvailableScreenResolution: function(keys) {
            var available;
            if (screen.availWidth && screen.availHeight) {
                if (this.options.detectScreenOrientation) {
                    available = (screen.availHeight > screen.availWidth) ? [screen.availHeight, screen.availWidth] : [screen.availWidth, screen.availHeight]
                } else {
                    available = [screen.availHeight, screen.availWidth]
                }
            }
            if (typeof available !== "undefined") {
                keys.push({
                    key: "available_resolution",
                    value: available
                })
            }
            return keys
        },
        timezoneOffsetKey: function(keys) {
            if (!this.options.excludeTimezoneOffset) {
                keys.push({
                    key: "timezone_offset",
                    value: new Date().getTimezoneOffset()
                })
            }
            return keys
        },
        sessionStorageKey: function(keys) {
            if (!this.options.excludeSessionStorage && this.hasSessionStorage()) {
                keys.push({
                    key: "session_storage",
                    value: 1
                })
            }
            return keys
        },
        localStorageKey: function(keys) {
            if (!this.options.excludeSessionStorage && this.hasLocalStorage()) {
                keys.push({
                    key: "local_storage",
                    value: 1
                })
            }
            return keys
        },
        indexedDbKey: function(keys) {
            if (!this.options.excludeIndexedDB && this.hasIndexedDB()) {
                keys.push({
                    key: "indexed_db",
                    value: 1
                })
            }
            return keys
        },
        addBehaviorKey: function(keys) {
            if (document.body && !this.options.excludeAddBehavior && document.body.addBehavior) {
                keys.push({
                    key: "add_behavior",
                    value: 1
                })
            }
            return keys
        },
        openDatabaseKey: function(keys) {
            if (!this.options.excludeOpenDatabase && window.openDatabase) {
                keys.push({
                    key: "open_database",
                    value: 1
                })
            }
            return keys
        },
        cpuClassKey: function(keys) {
            if (!this.options.excludeCpuClass) {
                keys.push({
                    key: "cpu_class",
                    value: this.getNavigatorCpuClass()
                })
            }
            return keys
        },
        platformKey: function(keys) {
            if (!this.options.excludePlatform) {
                keys.push({
                    key: "navigator_platform",
                    value: this.getNavigatorPlatform()
                })
            }
            return keys
        },
        doNotTrackKey: function(keys) {
            if (!this.options.excludeDoNotTrack) {
                keys.push({
                    key: "do_not_track",
                    value: this.getDoNotTrack()
                })
            }
            return keys
        },
        canvasKey: function(keys) {
            if (!this.options.excludeCanvas && this.isCanvasSupported()) {
                keys.push({
                    key: "canvas",
                    value: this.getCanvasFp()
                })
            }
            return keys
        },
        webglKey: function(keys) {
            if (this.options.excludeWebGL) {
                if (typeof NODEBUG === "undefined") {
                    this.log("Skipping WebGL fingerprinting per excludeWebGL configuration option")
                }
                return keys
            }
            if (!this.isWebGlSupported()) {
                if (typeof NODEBUG === "undefined") {
                    this.log("Skipping WebGL fingerprinting because it is not supported in this browser")
                }
                return keys
            }
            keys.push({
                key: "webgl",
                value: this.getWebglFp()
            });
            return keys
        },
        adBlockKey: function(keys) {
            if (!this.options.excludeAdBlock) {
                keys.push({
                    key: "adblock",
                    value: this.getAdBlock()
                })
            }
            return keys
        },
        hasLiedLanguagesKey: function(keys) {
            if (!this.options.excludeHasLiedLanguages) {
                keys.push({
                    key: "has_lied_languages",
                    value: this.getHasLiedLanguages()
                })
            }
            return keys
        },
        hasLiedResolutionKey: function(keys) {
            if (!this.options.excludeHasLiedResolution) {
                keys.push({
                    key: "has_lied_resolution",
                    value: this.getHasLiedResolution()
                })
            }
            return keys
        },
        hasLiedOsKey: function(keys) {
            if (!this.options.excludeHasLiedOs) {
                keys.push({
                    key: "has_lied_os",
                    value: this.getHasLiedOs()
                })
            }
            return keys
        },
        hasLiedBrowserKey: function(keys) {
            if (!this.options.excludeHasLiedBrowser) {
                keys.push({
                    key: "has_lied_browser",
                    value: this.getHasLiedBrowser()
                })
            }
            return keys
        },
        fontsKey: function(keys, done) {
            if (this.options.excludeJsFonts) {
                return this.flashFontsKey(keys, done)
            }
            return this.jsFontsKey(keys, done)
        },
        flashFontsKey: function(keys, done) {
            if (this.options.excludeFlashFonts) {
                if (typeof NODEBUG === "undefined") {
                    this.log("Skipping flash fonts detection per excludeFlashFonts configuration option")
                }
                return done(keys)
            }
            if (!this.hasSwfObjectLoaded()) {
                if (typeof NODEBUG === "undefined") {
                    this.log("Swfobject is not detected, Flash fonts enumeration is skipped")
                }
                return done(keys)
            }
            if (!this.hasMinFlashInstalled()) {
                if (typeof NODEBUG === "undefined") {
                    this.log("Flash is not installed, skipping Flash fonts enumeration")
                }
                return done(keys)
            }
            if (typeof this.options.swfPath === "undefined") {
                if (typeof NODEBUG === "undefined") {
                    this.log("To use Flash fonts detection, you must pass a valid swfPath option, skipping Flash fonts enumeration")
                }
                return done(keys)
            }
            this.loadSwfAndDetectFonts(function(fonts) {
                keys.push({
                    key: "swf_fonts",
                    value: fonts.join(";")
                });
                done(keys)
            })
        },
        jsFontsKey: function(keys, done) {
            var that = this;
            return setTimeout(function() {
                var baseFonts = ["monospace", "sans-serif", "serif"];
                var fontList = ["Andale Mono", "Arial", "Arial Black", "Arial Hebrew", "Arial MT", "Arial Narrow", "Arial Rounded MT Bold", "Arial Unicode MS", "Bitstream Vera Sans Mono", "Book Antiqua", "Bookman Old Style", "Calibri", "Cambria", "Cambria Math", "Century", "Century Gothic", "Century Schoolbook", "Comic Sans", "Comic Sans MS", "Consolas", "Courier", "Courier New", "Garamond", "Geneva", "Georgia", "Helvetica", "Helvetica Neue", "Impact", "Lucida Bright", "Lucida Calligraphy", "Lucida Console", "Lucida Fax", "LUCIDA GRANDE", "Lucida Handwriting", "Lucida Sans", "Lucida Sans Typewriter", "Lucida Sans Unicode", "Microsoft Sans Serif", "Monaco", "Monotype Corsiva", "MS Gothic", "MS Outlook", "MS PGothic", "MS Reference Sans Serif", "MS Sans Serif", "MS Serif", "MYRIAD", "MYRIAD PRO", "Palatino", "Palatino Linotype", "Segoe Print", "Segoe Script", "Segoe UI", "Segoe UI Light", "Segoe UI Semibold", "Segoe UI Symbol", "Tahoma", "Times", "Times New Roman", "Times New Roman PS", "Trebuchet MS", "Verdana", "Wingdings", "Wingdings 2", "Wingdings 3"];
                var extendedFontList = ["Abadi MT Condensed Light", "Academy Engraved LET", "ADOBE CASLON PRO", "Adobe Garamond", "ADOBE GARAMOND PRO", "Agency FB", "Aharoni", "Albertus Extra Bold", "Albertus Medium", "Algerian", "Amazone BT", "American Typewriter", "American Typewriter Condensed", "AmerType Md BT", "Andalus", "Angsana New", "AngsanaUPC", "Antique Olive", "Aparajita", "Apple Chancery", "Apple Color Emoji", "Apple SD Gothic Neo", "Arabic Typesetting", "ARCHER", "ARNO PRO", "Arrus BT", "Aurora Cn BT", "AvantGarde Bk BT", "AvantGarde Md BT", "AVENIR", "Ayuthaya", "Bandy", "Bangla Sangam MN", "Bank Gothic", "BankGothic Md BT", "Baskerville", "Baskerville Old Face", "Batang", "BatangChe", "Bauer Bodoni", "Bauhaus 93", "Bazooka", "Bell MT", "Bembo", "Benguiat Bk BT", "Berlin Sans FB", "Berlin Sans FB Demi", "Bernard MT Condensed", "BernhardFashion BT", "BernhardMod BT", "Big Caslon", "BinnerD", "Blackadder ITC", "BlairMdITC TT", "Bodoni 72", "Bodoni 72 Oldstyle", "Bodoni 72 Smallcaps", "Bodoni MT", "Bodoni MT Black", "Bodoni MT Condensed", "Bodoni MT Poster Compressed", "Bookshelf Symbol 7", "Boulder", "Bradley Hand", "Bradley Hand ITC", "Bremen Bd BT", "Britannic Bold", "Broadway", "Browallia New", "BrowalliaUPC", "Brush Script MT", "Californian FB", "Calisto MT", "Calligrapher", "Candara", "CaslonOpnface BT", "Castellar", "Centaur", "Cezanne", "CG Omega", "CG Times", "Chalkboard", "Chalkboard SE", "Chalkduster", "Charlesworth", "Charter Bd BT", "Charter BT", "Chaucer", "ChelthmITC Bk BT", "Chiller", "Clarendon", "Clarendon Condensed", "CloisterBlack BT", "Cochin", "Colonna MT", "Constantia", "Cooper Black", "Copperplate", "Copperplate Gothic", "Copperplate Gothic Bold", "Copperplate Gothic Light", "CopperplGoth Bd BT", "Corbel", "Cordia New", "CordiaUPC", "Cornerstone", "Coronet", "Cuckoo", "Curlz MT", "DaunPenh", "Dauphin", "David", "DB LCD Temp", "DELICIOUS", "Denmark", "DFKai-SB", "Didot", "DilleniaUPC", "DIN", "DokChampa", "Dotum", "DotumChe", "Ebrima", "Edwardian Script ITC", "Elephant", "English 111 Vivace BT", "Engravers MT", "EngraversGothic BT", "Eras Bold ITC", "Eras Demi ITC", "Eras Light ITC", "Eras Medium ITC", "EucrosiaUPC", "Euphemia", "Euphemia UCAS", "EUROSTILE", "Exotc350 Bd BT", "FangSong", "Felix Titling", "Fixedsys", "FONTIN", "Footlight MT Light", "Forte", "FrankRuehl", "Fransiscan", "Freefrm721 Blk BT", "FreesiaUPC", "Freestyle Script", "French Script MT", "FrnkGothITC Bk BT", "Fruitger", "FRUTIGER", "Futura", "Futura Bk BT", "Futura Lt BT", "Futura Md BT", "Futura ZBlk BT", "FuturaBlack BT", "Gabriola", "Galliard BT", "Gautami", "Geeza Pro", "Geometr231 BT", "Geometr231 Hv BT", "Geometr231 Lt BT", "GeoSlab 703 Lt BT", "GeoSlab 703 XBd BT", "Gigi", "Gill Sans", "Gill Sans MT", "Gill Sans MT Condensed", "Gill Sans MT Ext Condensed Bold", "Gill Sans Ultra Bold", "Gill Sans Ultra Bold Condensed", "Gisha", "Gloucester MT Extra Condensed", "GOTHAM", "GOTHAM BOLD", "Goudy Old Style", "Goudy Stout", "GoudyHandtooled BT", "GoudyOLSt BT", "Gujarati Sangam MN", "Gulim", "GulimChe", "Gungsuh", "GungsuhChe", "Gurmukhi MN", "Haettenschweiler", "Harlow Solid Italic", "Harrington", "Heather", "Heiti SC", "Heiti TC", "HELV", "Herald", "High Tower Text", "Hiragino Kaku Gothic ProN", "Hiragino Mincho ProN", "Hoefler Text", "Humanst 521 Cn BT", "Humanst521 BT", "Humanst521 Lt BT", "Imprint MT Shadow", "Incised901 Bd BT", "Incised901 BT", "Incised901 Lt BT", "INCONSOLATA", "Informal Roman", "Informal011 BT", "INTERSTATE", "IrisUPC", "Iskoola Pota", "JasmineUPC", "Jazz LET", "Jenson", "Jester", "Jokerman", "Juice ITC", "Kabel Bk BT", "Kabel Ult BT", "Kailasa", "KaiTi", "Kalinga", "Kannada Sangam MN", "Kartika", "Kaufmann Bd BT", "Kaufmann BT", "Khmer UI", "KodchiangUPC", "Kokila", "Korinna BT", "Kristen ITC", "Krungthep", "Kunstler Script", "Lao UI", "Latha", "Leelawadee", "Letter Gothic", "Levenim MT", "LilyUPC", "Lithograph", "Lithograph Light", "Long Island", "Lydian BT", "Magneto", "Maiandra GD", "Malayalam Sangam MN", "Malgun Gothic", "Mangal", "Marigold", "Marion", "Marker Felt", "Market", "Marlett", "Matisse ITC", "Matura MT Script Capitals", "Meiryo", "Meiryo UI", "Microsoft Himalaya", "Microsoft JhengHei", "Microsoft New Tai Lue", "Microsoft PhagsPa", "Microsoft Tai Le", "Microsoft Uighur", "Microsoft YaHei", "Microsoft Yi Baiti", "MingLiU", "MingLiU_HKSCS", "MingLiU_HKSCS-ExtB", "MingLiU-ExtB", "Minion", "Minion Pro", "Miriam", "Miriam Fixed", "Mistral", "Modern", "Modern No. 20", "Mona Lisa Solid ITC TT", "Mongolian Baiti", "MONO", "MoolBoran", "Mrs Eaves", "MS LineDraw", "MS Mincho", "MS PMincho", "MS Reference Specialty", "MS UI Gothic", "MT Extra", "MUSEO", "MV Boli", "Nadeem", "Narkisim", "NEVIS", "News Gothic", "News GothicMT", "NewsGoth BT", "Niagara Engraved", "Niagara Solid", "Noteworthy", "NSimSun", "Nyala", "OCR A Extended", "Old Century", "Old English Text MT", "Onyx", "Onyx BT", "OPTIMA", "Oriya Sangam MN", "OSAKA", "OzHandicraft BT", "Palace Script MT", "Papyrus", "Parchment", "Party LET", "Pegasus", "Perpetua", "Perpetua Titling MT", "PetitaBold", "Pickwick", "Plantagenet Cherokee", "Playbill", "PMingLiU", "PMingLiU-ExtB", "Poor Richard", "Poster", "PosterBodoni BT", "PRINCETOWN LET", "Pristina", "PTBarnum BT", "Pythagoras", "Raavi", "Rage Italic", "Ravie", "Ribbon131 Bd BT", "Rockwell", "Rockwell Condensed", "Rockwell Extra Bold", "Rod", "Roman", "Sakkal Majalla", "Santa Fe LET", "Savoye LET", "Sceptre", "Script", "Script MT Bold", "SCRIPTINA", "Serifa", "Serifa BT", "Serifa Th BT", "ShelleyVolante BT", "Sherwood", "Shonar Bangla", "Showcard Gothic", "Shruti", "Signboard", "SILKSCREEN", "SimHei", "Simplified Arabic", "Simplified Arabic Fixed", "SimSun", "SimSun-ExtB", "Sinhala Sangam MN", "Sketch Rockwell", "Skia", "Small Fonts", "Snap ITC", "Snell Roundhand", "Socket", "Souvenir Lt BT", "Staccato222 BT", "Steamer", "Stencil", "Storybook", "Styllo", "Subway", "Swis721 BlkEx BT", "Swiss911 XCm BT", "Sylfaen", "Synchro LET", "System", "Tamil Sangam MN", "Technical", "Teletype", "Telugu Sangam MN", "Tempus Sans ITC", "Terminal", "Thonburi", "Traditional Arabic", "Trajan", "TRAJAN PRO", "Tristan", "Tubular", "Tunga", "Tw Cen MT", "Tw Cen MT Condensed", "Tw Cen MT Condensed Extra Bold", "TypoUpright BT", "Unicorn", "Univers", "Univers CE 55 Medium", "Univers Condensed", "Utsaah", "Vagabond", "Vani", "Vijaya", "Viner Hand ITC", "VisualUI", "Vivaldi", "Vladimir Script", "Vrinda", "Westminster", "WHITNEY", "Wide Latin", "ZapfEllipt BT", "ZapfHumnst BT", "ZapfHumnst Dm BT", "Zapfino", "Zurich BlkEx BT", "Zurich Ex BT", "ZWAdobeF"];
                if (that.options.extendedJsFonts) {
                    fontList = fontList.concat(extendedFontList)
                }
                var testString = "mmmmmmmmmmlli";
                var testSize = "72px";
                var h = document.getElementsByTagName("body")[0];
                var baseFontsDiv = document.createElement("div");
                var fontsDiv = document.createElement("div");
                var defaultWidth = {};
                var defaultHeight = {};
                var createSpan = function() {
                    var s = document.createElement("span");
                    s.style.position = "absolute";
                    s.style.left = "-9999px";
                    s.style.fontSize = testSize;
                    s.innerHTML = testString;
                    return s
                };
                var createSpanWithFonts = function(fontToDetect, baseFont) {
                    var s = createSpan();
                    s.style.fontFamily = "'" + fontToDetect + "'," + baseFont;
                    return s
                };
                var initializeBaseFontsSpans = function() {
                    var spans = [];
                    for (var index = 0,
                    length = baseFonts.length; index < length; index++) {
                        var s = createSpan();
                        s.style.fontFamily = baseFonts[index];
                        baseFontsDiv.appendChild(s);
                        spans.push(s)
                    }
                    return spans
                };
                var initializeFontsSpans = function() {
                    var spans = {};
                    for (var i = 0,
                    l = fontList.length; i < l; i++) {
                        var fontSpans = [];
                        for (var j = 0,
                        numDefaultFonts = baseFonts.length; j < numDefaultFonts; j++) {
                            var s = createSpanWithFonts(fontList[i], baseFonts[j]);
                            fontsDiv.appendChild(s);
                            fontSpans.push(s)
                        }
                        spans[fontList[i]] = fontSpans
                    }
                    return spans
                };
                var isFontAvailable = function(fontSpans) {
                    var detected = false;
                    for (var i = 0; i < baseFonts.length; i++) {
                        detected = (fontSpans[i].offsetWidth !== defaultWidth[baseFonts[i]] || fontSpans[i].offsetHeight !== defaultHeight[baseFonts[i]]);
                        if (detected) {
                            return detected
                        }
                    }
                    return detected
                };
                var baseFontsSpans = initializeBaseFontsSpans();
                h.appendChild(baseFontsDiv);
                for (var index = 0,
                length = baseFonts.length; index < length; index++) {
                    defaultWidth[baseFonts[index]] = baseFontsSpans[index].offsetWidth;
                    defaultHeight[baseFonts[index]] = baseFontsSpans[index].offsetHeight
                }
                var fontsSpans = initializeFontsSpans();
                h.appendChild(fontsDiv);
                var available = [];
                for (var i = 0,
                l = fontList.length; i < l; i++) {
                    if (isFontAvailable(fontsSpans[fontList[i]])) {
                        available.push(fontList[i])
                    }
                }
                h.removeChild(fontsDiv);
                h.removeChild(baseFontsDiv);
                keys.push({
                    key: "js_fonts",
                    value: available
                });
                done(keys)
            },
            1)
        },
        pluginsKey: function(keys) {
            if (!this.options.excludePlugins) {
                if (this.isIE()) {
                    if (!this.options.excludeIEPlugins) {
                        keys.push({
                            key: "ie_plugins",
                            value: this.getIEPlugins()
                        })
                    }
                } else {
                    keys.push({
                        key: "regular_plugins",
                        value: this.getRegularPlugins()
                    })
                }
            }
            return keys
        },
        getRegularPlugins: function() {
            var plugins = [];
            for (var i = 0,
            l = navigator.plugins.length; i < l; i++) {
                plugins.push(navigator.plugins[i])
            }
            if (this.pluginsShouldBeSorted()) {
                plugins = plugins.sort(function(a, b) {
                    if (a.name > b.name) {
                        return 1
                    }
                    if (a.name < b.name) {
                        return - 1
                    }
                    return 0
                })
            }
            return this.map(plugins,
            function(p) {
                var mimeTypes = this.map(p,
                function(mt) {
                    return [mt.type, mt.suffixes].join("~")
                }).join(",");
                return [p.name, p.description, mimeTypes].join("::")
            },
            this)
        },
        getIEPlugins: function() {
            var result = [];
            if ((Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(window, "ActiveXObject")) || ("ActiveXObject" in window)) {
                var names = ["AcroPDF.PDF", "Adodb.Stream", "AgControl.AgControl", "DevalVRXCtrl.DevalVRXCtrl.1", "MacromediaFlashPaper.MacromediaFlashPaper", "Msxml2.DOMDocument", "Msxml2.XMLHTTP", "PDF.PdfCtrl", "QuickTime.QuickTime", "QuickTimeCheckObject.QuickTimeCheck.1", "RealPlayer", "RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)", "RealVideo.RealVideo(tm) ActiveX Control (32-bit)", "Scripting.Dictionary", "SWCtl.SWCtl", "Shell.UIHelper", "ShockwaveFlash.ShockwaveFlash", "Skype.Detection", "TDCCtl.TDCCtl", "WMPlayer.OCX", "rmocx.RealPlayer G2 Control", "rmocx.RealPlayer G2 Control.1"];
                result = this.map(names,
                function(name) {
                    try {
                        new ActiveXObject(name);
                        return name
                    } catch(e) {
                        return null
                    }
                })
            }
            if (navigator.plugins) {
                result = result.concat(this.getRegularPlugins())
            }
            return result
        },
        pluginsShouldBeSorted: function() {
            var should = false;
            for (var i = 0,
            l = this.options.sortPluginsFor.length; i < l; i++) {
                var re = this.options.sortPluginsFor[i];
                if (navigator.userAgent.match(re)) {
                    should = true;
                    break
                }
            }
            return should
        },
        touchSupportKey: function(keys) {
            if (!this.options.excludeTouchSupport) {
                keys.push({
                    key: "touch_support",
                    value: this.getTouchSupport()
                })
            }
            return keys
        },
        hasSessionStorage: function() {
            try {
                return !! window.sessionStorage
            } catch(e) {
                return true
            }
        },
        hasLocalStorage: function() {
            try {
                return !! window.localStorage
            } catch(e) {
                return true
            }
        },
        hasIndexedDB: function() {
            return !! window.indexedDB
        },
        getNavigatorCpuClass: function() {
            if (navigator.cpuClass) {
                return navigator.cpuClass
            } else {
                return "unknown"
            }
        },
        getNavigatorPlatform: function() {
            if (navigator.platform) {
                return navigator.platform
            } else {
                return "unknown"
            }
        },
        getDoNotTrack: function() {
            if (navigator.doNotTrack) {
                return navigator.doNotTrack
            } else {
                return "unknown"
            }
        },
        getTouchSupport: function() {
            var maxTouchPoints = 0;
            var touchEvent = false;
            if (typeof navigator.maxTouchPoints !== "undefined") {
                maxTouchPoints = navigator.maxTouchPoints
            } else {
                if (typeof navigator.msMaxTouchPoints !== "undefined") {
                    maxTouchPoints = navigator.msMaxTouchPoints
                }
            }
            try {
                document.createEvent("TouchEvent");
                touchEvent = true
            } catch(_) {}
            var touchStart = "ontouchstart" in window;
            return [maxTouchPoints, touchEvent, touchStart]
        },
        getCanvasFp: function() {
            var result = [];
            var canvas = document.createElement("canvas");
            canvas.width = 2000;
            canvas.height = 200;
            canvas.style.display = "inline";
            var ctx = canvas.getContext("2d");
            ctx.rect(0, 0, 10, 10);
            ctx.rect(2, 2, 6, 6);
            result.push("canvas winding:" + ((ctx.isPointInPath(5, 5, "evenodd") === false) ? "yes": "no"));
            ctx.textBaseline = "alphabetic";
            ctx.fillStyle = "#f60";
            ctx.fillRect(125, 1, 62, 20);
            ctx.fillStyle = "#069";
            if (this.options.dontUseFakeFontInCanvas) {
                ctx.font = "11pt Arial"
            } else {
                ctx.font = "11pt no-real-font-123"
            }
            ctx.fillText("Cwm fjordbank glyphs vext quiz, \ud83d\ude03", 2, 15);
            ctx.fillStyle = "rgba(102, 204, 0, 0.2)";
            ctx.font = "18pt Arial";
            ctx.fillText("Cwm fjordbank glyphs vext quiz, \ud83d\ude03", 4, 45);
            ctx.globalCompositeOperation = "multiply";
            ctx.fillStyle = "rgb(255,0,255)";
            ctx.beginPath();
            ctx.arc(50, 50, 50, 0, Math.PI * 2, true);
            ctx.closePath();
            ctx.fill();
            ctx.fillStyle = "rgb(0,255,255)";
            ctx.beginPath();
            ctx.arc(100, 50, 50, 0, Math.PI * 2, true);
            ctx.closePath();
            ctx.fill();
            ctx.fillStyle = "rgb(255,255,0)";
            ctx.beginPath();
            ctx.arc(75, 100, 50, 0, Math.PI * 2, true);
            ctx.closePath();
            ctx.fill();
            ctx.fillStyle = "rgb(255,0,255)";
            ctx.arc(75, 75, 75, 0, Math.PI * 2, true);
            ctx.arc(75, 75, 25, 0, Math.PI * 2, true);
            ctx.fill("evenodd");
            result.push("canvas fp:" + canvas.toDataURL());
            return result.join("~")
        },
        getWebglFp: function() {
            var gl;
            var fa2s = function(fa) {
                gl.clearColor(0, 0, 0, 1);
                gl.enable(gl.DEPTH_TEST);
                gl.depthFunc(gl.LEQUAL);
                gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
                return "[" + fa[0] + ", " + fa[1] + "]"
            };
            var maxAnisotropy = function(gl) {
                var anisotropy, ext = gl.getExtension("EXT_texture_filter_anisotropic") || gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic") || gl.getExtension("MOZ_EXT_texture_filter_anisotropic");
                return ext ? (anisotropy = gl.getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT), 0 === anisotropy && (anisotropy = 2), anisotropy) : null
            };
            gl = this.getWebglCanvas();
            if (!gl) {
                return null
            }
            var result = [];
            var vShaderTemplate = "attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}";
            var fShaderTemplate = "precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}";
            var vertexPosBuffer = gl.createBuffer();
            gl.bindBuffer(gl.ARRAY_BUFFER, vertexPosBuffer);
            var vertices = new Float32Array([ - 0.2, -0.9, 0, 0.4, -0.26, 0, 0, 0.732134444, 0]);
            gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
            vertexPosBuffer.itemSize = 3;
            vertexPosBuffer.numItems = 3;
            var program = gl.createProgram(),
            vshader = gl.createShader(gl.VERTEX_SHADER);
            gl.shaderSource(vshader, vShaderTemplate);
            gl.compileShader(vshader);
            var fshader = gl.createShader(gl.FRAGMENT_SHADER);
            gl.shaderSource(fshader, fShaderTemplate);
            gl.compileShader(fshader);
            gl.attachShader(program, vshader);
            gl.attachShader(program, fshader);
            gl.linkProgram(program);
            gl.useProgram(program);
            program.vertexPosAttrib = gl.getAttribLocation(program, "attrVertex");
            program.offsetUniform = gl.getUniformLocation(program, "uniformOffset");
            gl.enableVertexAttribArray(program.vertexPosArray);
            gl.vertexAttribPointer(program.vertexPosAttrib, vertexPosBuffer.itemSize, gl.FLOAT, !1, 0, 0);
            gl.uniform2f(program.offsetUniform, 1, 1);
            gl.drawArrays(gl.TRIANGLE_STRIP, 0, vertexPosBuffer.numItems);
            if (gl.canvas != null) {
                result.push(gl.canvas.toDataURL())
            }
            result.push("extensions:" + gl.getSupportedExtensions().join(";"));
            result.push("webgl aliased line width range:" + fa2s(gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE)));
            result.push("webgl aliased point size range:" + fa2s(gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE)));
            result.push("webgl alpha bits:" + gl.getParameter(gl.ALPHA_BITS));
            result.push("webgl antialiasing:" + (gl.getContextAttributes().antialias ? "yes": "no"));
            result.push("webgl blue bits:" + gl.getParameter(gl.BLUE_BITS));
            result.push("webgl depth bits:" + gl.getParameter(gl.DEPTH_BITS));
            result.push("webgl green bits:" + gl.getParameter(gl.GREEN_BITS));
            result.push("webgl max anisotropy:" + maxAnisotropy(gl));
            result.push("webgl max combined texture image units:" + gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS));
            result.push("webgl max cube map texture size:" + gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE));
            result.push("webgl max fragment uniform vectors:" + gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS));
            result.push("webgl max render buffer size:" + gl.getParameter(gl.MAX_RENDERBUFFER_SIZE));
            result.push("webgl max texture image units:" + gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS));
            result.push("webgl max texture size:" + gl.getParameter(gl.MAX_TEXTURE_SIZE));
            result.push("webgl max varying vectors:" + gl.getParameter(gl.MAX_VARYING_VECTORS));
            result.push("webgl max vertex attribs:" + gl.getParameter(gl.MAX_VERTEX_ATTRIBS));
            result.push("webgl max vertex texture image units:" + gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS));
            result.push("webgl max vertex uniform vectors:" + gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS));
            result.push("webgl max viewport dims:" + fa2s(gl.getParameter(gl.MAX_VIEWPORT_DIMS)));
            result.push("webgl red bits:" + gl.getParameter(gl.RED_BITS));
            result.push("webgl renderer:" + gl.getParameter(gl.RENDERER));
            result.push("webgl shading language version:" + gl.getParameter(gl.SHADING_LANGUAGE_VERSION));
            result.push("webgl stencil bits:" + gl.getParameter(gl.STENCIL_BITS));
            result.push("webgl vendor:" + gl.getParameter(gl.VENDOR));
            result.push("webgl version:" + gl.getParameter(gl.VERSION));
            if (!gl.getShaderPrecisionFormat) {
                if (typeof NODEBUG === "undefined") {
                    this.log("WebGL fingerprinting is incomplete, because your browser does not support getShaderPrecisionFormat")
                }
                return result.join("~")
            }
            result.push("webgl vertex shader high float precision:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT).precision);
            result.push("webgl vertex shader high float precision rangeMin:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT).rangeMin);
            result.push("webgl vertex shader high float precision rangeMax:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT).rangeMax);
            result.push("webgl vertex shader medium float precision:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).precision);
            result.push("webgl vertex shader medium float precision rangeMin:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).rangeMin);
            result.push("webgl vertex shader medium float precision rangeMax:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).rangeMax);
            result.push("webgl vertex shader low float precision:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT).precision);
            result.push("webgl vertex shader low float precision rangeMin:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT).rangeMin);
            result.push("webgl vertex shader low float precision rangeMax:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT).rangeMax);
            result.push("webgl fragment shader high float precision:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision);
            result.push("webgl fragment shader high float precision rangeMin:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).rangeMin);
            result.push("webgl fragment shader high float precision rangeMax:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).rangeMax);
            result.push("webgl fragment shader medium float precision:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).precision);
            result.push("webgl fragment shader medium float precision rangeMin:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).rangeMin);
            result.push("webgl fragment shader medium float precision rangeMax:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).rangeMax);
            result.push("webgl fragment shader low float precision:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_FLOAT).precision);
            result.push("webgl fragment shader low float precision rangeMin:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_FLOAT).rangeMin);
            result.push("webgl fragment shader low float precision rangeMax:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_FLOAT).rangeMax);
            result.push("webgl vertex shader high int precision:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_INT).precision);
            result.push("webgl vertex shader high int precision rangeMin:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_INT).rangeMin);
            result.push("webgl vertex shader high int precision rangeMax:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_INT).rangeMax);
            result.push("webgl vertex shader medium int precision:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_INT).precision);
            result.push("webgl vertex shader medium int precision rangeMin:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_INT).rangeMin);
            result.push("webgl vertex shader medium int precision rangeMax:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_INT).rangeMax);
            result.push("webgl vertex shader low int precision:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_INT).precision);
            result.push("webgl vertex shader low int precision rangeMin:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_INT).rangeMin);
            result.push("webgl vertex shader low int precision rangeMax:" + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_INT).rangeMax);
            result.push("webgl fragment shader high int precision:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_INT).precision);
            result.push("webgl fragment shader high int precision rangeMin:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_INT).rangeMin);
            result.push("webgl fragment shader high int precision rangeMax:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_INT).rangeMax);
            result.push("webgl fragment shader medium int precision:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_INT).precision);
            result.push("webgl fragment shader medium int precision rangeMin:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_INT).rangeMin);
            result.push("webgl fragment shader medium int precision rangeMax:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_INT).rangeMax);
            result.push("webgl fragment shader low int precision:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_INT).precision);
            result.push("webgl fragment shader low int precision rangeMin:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_INT).rangeMin);
            result.push("webgl fragment shader low int precision rangeMax:" + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_INT).rangeMax);
            return result.join("~")
        },
        getAdBlock: function() {
            var ads = document.createElement("div");
            ads.innerHTML = "&nbsp;";
            ads.className = "adsbox";
            var result = false;
            try {
                document.body.appendChild(ads);
                result = document.getElementsByClassName("adsbox")[0].offsetHeight === 0;
                document.body.removeChild(ads)
            } catch(e) {
                result = false
            }
            return result
        },
        getHasLiedLanguages: function() {
            if (typeof navigator.languages !== "undefined") {
                try {
                    var firstLanguages = navigator.languages[0].substr(0, 2);
                    if (firstLanguages !== navigator.language.substr(0, 2)) {
                        return true
                    }
                } catch(err) {
                    return true
                }
            }
            return false
        },
        getHasLiedResolution: function() {
            if (screen.width < screen.availWidth) {
                return true
            }
            if (screen.height < screen.availHeight) {
                return true
            }
            return false
        },
        getHasLiedOs: function() {
            var userAgent = navigator.userAgent.toLowerCase();
            var oscpu = navigator.oscpu;
            var platform = navigator.platform.toLowerCase();
            var os;
            if (userAgent.indexOf("windows phone") >= 0) {
                os = "Windows Phone"
            } else {
                if (userAgent.indexOf("win") >= 0) {
                    os = "Windows"
                } else {
                    if (userAgent.indexOf("android") >= 0) {
                        os = "Android"
                    } else {
                        if (userAgent.indexOf("linux") >= 0) {
                            os = "Linux"
                        } else {
                            if (userAgent.indexOf("iphone") >= 0 || userAgent.indexOf("ipad") >= 0) {
                                os = "iOS"
                            } else {
                                if (userAgent.indexOf("mac") >= 0) {
                                    os = "Mac"
                                } else {
                                    os = "Other"
                                }
                            }
                        }
                    }
                }
            }
            var mobileDevice;
            if (("ontouchstart" in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)) {
                mobileDevice = true
            } else {
                mobileDevice = false
            }
            if (mobileDevice && os !== "Windows Phone" && os !== "Android" && os !== "iOS" && os !== "Other") {
                return true
            }
            if (typeof oscpu !== "undefined") {
                oscpu = oscpu.toLowerCase();
                if (oscpu.indexOf("win") >= 0 && os !== "Windows" && os !== "Windows Phone") {
                    return true
                } else {
                    if (oscpu.indexOf("linux") >= 0 && os !== "Linux" && os !== "Android") {
                        return true
                    } else {
                        if (oscpu.indexOf("mac") >= 0 && os !== "Mac" && os !== "iOS") {
                            return true
                        } else {
                            if (oscpu.indexOf("win") === 0 && oscpu.indexOf("linux") === 0 && oscpu.indexOf("mac") >= 0 && os !== "other") {
                                return true
                            }
                        }
                    }
                }
            }
            if (platform.indexOf("win") >= 0 && os !== "Windows" && os !== "Windows Phone") {
                return true
            } else {
                if ((platform.indexOf("linux") >= 0 || platform.indexOf("android") >= 0 || platform.indexOf("pike") >= 0) && os !== "Linux" && os !== "Android") {
                    return true
                } else {
                    if ((platform.indexOf("mac") >= 0 || platform.indexOf("ipad") >= 0 || platform.indexOf("ipod") >= 0 || platform.indexOf("iphone") >= 0) && os !== "Mac" && os !== "iOS") {
                        return true
                    } else {
                        if (platform.indexOf("win") === 0 && platform.indexOf("linux") === 0 && platform.indexOf("mac") >= 0 && os !== "other") {
                            return true
                        }
                    }
                }
            }
            if (typeof navigator.plugins === "undefined" && os !== "Windows" && os !== "Windows Phone") {
                return true
            }
            return false
        },
        getHasLiedBrowser: function() {
            var userAgent = navigator.userAgent.toLowerCase();
            var productSub = navigator.productSub;
            var browser;
            if (userAgent.indexOf("firefox") >= 0) {
                browser = "Firefox"
            } else {
                if (userAgent.indexOf("opera") >= 0 || userAgent.indexOf("opr") >= 0) {
                    browser = "Opera"
                } else {
                    if (userAgent.indexOf("chrome") >= 0) {
                        browser = "Chrome"
                    } else {
                        if (userAgent.indexOf("safari") >= 0) {
                            browser = "Safari"
                        } else {
                            if (userAgent.indexOf("trident") >= 0) {
                                browser = "Internet Explorer"
                            } else {
                                browser = "Other"
                            }
                        }
                    }
                }
            }
            if ((browser === "Chrome" || browser === "Safari" || browser === "Opera") && productSub !== "20030107") {
                return true
            }
            var tempRes = eval.toString().length;
            if (tempRes === 37 && browser !== "Safari" && browser !== "Firefox" && browser !== "Other") {
                return true
            } else {
                if (tempRes === 39 && browser !== "Internet Explorer" && browser !== "Other") {
                    return true
                } else {
                    if (tempRes === 33 && browser !== "Chrome" && browser !== "Opera" && browser !== "Other") {
                        return true
                    }
                }
            }
            var errFirefox;
            try {
                throw "a"
            } catch(err) {
                try {
                    err.toSource();
                    errFirefox = true
                } catch(errOfErr) {
                    errFirefox = false
                }
            }
            if (errFirefox && browser !== "Firefox" && browser !== "Other") {
                return true
            }
            return false
        },
        isCanvasSupported: function() {
            var elem = document.createElement("canvas");
            return !! (elem.getContext && elem.getContext("2d"))
        },
        isWebGlSupported: function() {
            if (!this.isCanvasSupported()) {
                return false
            }
            var canvas = document.createElement("canvas"),
            glContext;
            try {
                glContext = canvas.getContext && (canvas.getContext("webgl") || canvas.getContext("experimental-webgl"))
            } catch(e) {
                glContext = false
            }
            return !! window.WebGLRenderingContext && !!glContext
        },
        isIE: function() {
            if (navigator.appName === "Microsoft Internet Explorer") {
                return true
            } else {
                if (navigator.appName === "Netscape" && /Trident/.test(navigator.userAgent)) {
                    return true
                }
            }
            return false
        },
        hasSwfObjectLoaded: function() {
            return typeof window.swfobject !== "undefined"
        },
        hasMinFlashInstalled: function() {
            return swfobject.hasFlashPlayerVersion("9.0.0")
        },
        addFlashDivNode: function() {
            var node = document.createElement("div");
            node.setAttribute("id", this.options.swfContainerId);
            document.body.appendChild(node)
        },
        loadSwfAndDetectFonts: function(done) {
            var hiddenCallback = "___fp_swf_loaded";
            window[hiddenCallback] = function(fonts) {
                done(fonts)
            };
            var id = this.options.swfContainerId;
            this.addFlashDivNode();
            var flashvars = {
                onReady: hiddenCallback
            };
            var flashparams = {
                allowScriptAccess: "always",
                menu: "false"
            };
            swfobject.embedSWF(this.options.swfPath, id, "1", "1", "9.0.0", false, flashvars, flashparams, {})
        },
        getWebglCanvas: function() {
            var canvas = document.createElement("canvas");
            var gl = null;
            try {
                gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl")
            } catch(e) {}
            if (!gl) {
                gl = null
            }
            return gl
        },
        each: function(obj, iterator, context) {
            if (obj === null) {
                return
            }
            if (this.nativeForEach && obj.forEach === this.nativeForEach) {
                obj.forEach(iterator, context)
            } else {
                if (obj.length === +obj.length) {
                    for (var i = 0,
                    l = obj.length; i < l; i++) {
                        if (iterator.call(context, obj[i], i, obj) === {}) {
                            return
                        }
                    }
                } else {
                    for (var key in obj) {
                        if (obj.hasOwnProperty(key)) {
                            if (iterator.call(context, obj[key], key, obj) === {}) {
                                return
                            }
                        }
                    }
                }
            }
        },
        map: function(obj, iterator, context) {
            var results = [];
            if (obj == null) {
                return results
            }
            if (this.nativeMap && obj.map === this.nativeMap) {
                return obj.map(iterator, context)
            }
            this.each(obj,
            function(value, index, list) {
                results[results.length] = iterator.call(context, value, index, list)
            });
            return results
        },
        x64Add: function(m, n) {
            m = [m[0] >>> 16, m[0] & 65535, m[1] >>> 16, m[1] & 65535];
            n = [n[0] >>> 16, n[0] & 65535, n[1] >>> 16, n[1] & 65535];
            var o = [0, 0, 0, 0];
            o[3] += m[3] + n[3];
            o[2] += o[3] >>> 16;
            o[3] &= 65535;
            o[2] += m[2] + n[2];
            o[1] += o[2] >>> 16;
            o[2] &= 65535;
            o[1] += m[1] + n[1];
            o[0] += o[1] >>> 16;
            o[1] &= 65535;
            o[0] += m[0] + n[0];
            o[0] &= 65535;
            return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]
        },
        x64Multiply: function(m, n) {
            m = [m[0] >>> 16, m[0] & 65535, m[1] >>> 16, m[1] & 65535];
            n = [n[0] >>> 16, n[0] & 65535, n[1] >>> 16, n[1] & 65535];
            var o = [0, 0, 0, 0];
            o[3] += m[3] * n[3];
            o[2] += o[3] >>> 16;
            o[3] &= 65535;
            o[2] += m[2] * n[3];
            o[1] += o[2] >>> 16;
            o[2] &= 65535;
            o[2] += m[3] * n[2];
            o[1] += o[2] >>> 16;
            o[2] &= 65535;
            o[1] += m[1] * n[3];
            o[0] += o[1] >>> 16;
            o[1] &= 65535;
            o[1] += m[2] * n[2];
            o[0] += o[1] >>> 16;
            o[1] &= 65535;
            o[1] += m[3] * n[1];
            o[0] += o[1] >>> 16;
            o[1] &= 65535;
            o[0] += (m[0] * n[3]) + (m[1] * n[2]) + (m[2] * n[1]) + (m[3] * n[0]);
            o[0] &= 65535;
            return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]
        },
        x64Rotl: function(m, n) {
            n %= 64;
            if (n === 32) {
                return [m[1], m[0]]
            } else {
                if (n < 32) {
                    return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))]
                } else {
                    n -= 32;
                    return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))]
                }
            }
        },
        x64LeftShift: function(m, n) {
            n %= 64;
            if (n === 0) {
                return m
            } else {
                if (n < 32) {
                    return [(m[0] << n) | (m[1] >>> (32 - n)), m[1] << n]
                } else {
                    return [m[1] << (n - 32), 0]
                }
            }
        },
        x64Xor: function(m, n) {
            return [m[0] ^ n[0], m[1] ^ n[1]]
        },
        x64Fmix: function(h) {
            h = this.x64Xor(h, [0, h[0] >>> 1]);
            h = this.x64Multiply(h, [4283543511, 3981806797]);
            h = this.x64Xor(h, [0, h[0] >>> 1]);
            h = this.x64Multiply(h, [3301882366, 444984403]);
            h = this.x64Xor(h, [0, h[0] >>> 1]);
            return h
        },
        x64hash128: function(key, seed) {
            key = key || "";
            seed = seed || 0;
            var remainder = key.length % 16;
            var bytes = key.length - remainder;
            var h1 = [0, seed];
            var h2 = [0, seed];
            var k1 = [0, 0];
            var k2 = [0, 0];
            var c1 = [2277735313, 289559509];
            var c2 = [1291169091, 658871167];
            for (var i = 0; i < bytes; i = i + 16) {
                k1 = [((key.charCodeAt(i + 4) & 255)) | ((key.charCodeAt(i + 5) & 255) << 8) | ((key.charCodeAt(i + 6) & 255) << 16) | ((key.charCodeAt(i + 7) & 255) << 24), ((key.charCodeAt(i) & 255)) | ((key.charCodeAt(i + 1) & 255) << 8) | ((key.charCodeAt(i + 2) & 255) << 16) | ((key.charCodeAt(i + 3) & 255) << 24)];
                k2 = [((key.charCodeAt(i + 12) & 255)) | ((key.charCodeAt(i + 13) & 255) << 8) | ((key.charCodeAt(i + 14) & 255) << 16) | ((key.charCodeAt(i + 15) & 255) << 24), ((key.charCodeAt(i + 8) & 255)) | ((key.charCodeAt(i + 9) & 255) << 8) | ((key.charCodeAt(i + 10) & 255) << 16) | ((key.charCodeAt(i + 11) & 255) << 24)];
                k1 = this.x64Multiply(k1, c1);
                k1 = this.x64Rotl(k1, 31);
                k1 = this.x64Multiply(k1, c2);
                h1 = this.x64Xor(h1, k1);
                h1 = this.x64Rotl(h1, 27);
                h1 = this.x64Add(h1, h2);
                h1 = this.x64Add(this.x64Multiply(h1, [0, 5]), [0, 1390208809]);
                k2 = this.x64Multiply(k2, c2);
                k2 = this.x64Rotl(k2, 33);
                k2 = this.x64Multiply(k2, c1);
                h2 = this.x64Xor(h2, k2);
                h2 = this.x64Rotl(h2, 31);
                h2 = this.x64Add(h2, h1);
                h2 = this.x64Add(this.x64Multiply(h2, [0, 5]), [0, 944331445])
            }
            k1 = [0, 0];
            k2 = [0, 0];
            switch (remainder) {
            case 15:
                k2 = this.x64Xor(k2, this.x64LeftShift([0, key.charCodeAt(i + 14)], 48));
            case 14:
                k2 = this.x64Xor(k2, this.x64LeftShift([0, key.charCodeAt(i + 13)], 40));
            case 13:
                k2 = this.x64Xor(k2, this.x64LeftShift([0, key.charCodeAt(i + 12)], 32));
            case 12:
                k2 = this.x64Xor(k2, this.x64LeftShift([0, key.charCodeAt(i + 11)], 24));
            case 11:
                k2 = this.x64Xor(k2, this.x64LeftShift([0, key.charCodeAt(i + 10)], 16));
            case 10:
                k2 = this.x64Xor(k2, this.x64LeftShift([0, key.charCodeAt(i + 9)], 8));
            case 9:
                k2 = this.x64Xor(k2, [0, key.charCodeAt(i + 8)]);
                k2 = this.x64Multiply(k2, c2);
                k2 = this.x64Rotl(k2, 33);
                k2 = this.x64Multiply(k2, c1);
                h2 = this.x64Xor(h2, k2);
            case 8:
                k1 = this.x64Xor(k1, this.x64LeftShift([0, key.charCodeAt(i + 7)], 56));
            case 7:
                k1 = this.x64Xor(k1, this.x64LeftShift([0, key.charCodeAt(i + 6)], 48));
            case 6:
                k1 = this.x64Xor(k1, this.x64LeftShift([0, key.charCodeAt(i + 5)], 40));
            case 5:
                k1 = this.x64Xor(k1, this.x64LeftShift([0, key.charCodeAt(i + 4)], 32));
            case 4:
                k1 = this.x64Xor(k1, this.x64LeftShift([0, key.charCodeAt(i + 3)], 24));
            case 3:
                k1 = this.x64Xor(k1, this.x64LeftShift([0, key.charCodeAt(i + 2)], 16));
            case 2:
                k1 = this.x64Xor(k1, this.x64LeftShift([0, key.charCodeAt(i + 1)], 8));
            case 1:
                k1 = this.x64Xor(k1, [0, key.charCodeAt(i)]);
                k1 = this.x64Multiply(k1, c1);
                k1 = this.x64Rotl(k1, 31);
                k1 = this.x64Multiply(k1, c2);
                h1 = this.x64Xor(h1, k1)
            }
            h1 = this.x64Xor(h1, [0, key.length]);
            h2 = this.x64Xor(h2, [0, key.length]);
            h1 = this.x64Add(h1, h2);
            h2 = this.x64Add(h2, h1);
            h1 = this.x64Fmix(h1);
            h2 = this.x64Fmix(h2);
            h1 = this.x64Add(h1, h2);
            h2 = this.x64Add(h2, h1);
            return ("00000000" + (h1[0] >>> 0).toString(16)).slice( - 8) + ("00000000" + (h1[1] >>> 0).toString(16)).slice( - 8) + ("00000000" + (h2[0] >>> 0).toString(16)).slice( - 8) + ("00000000" + (h2[1] >>> 0).toString(16)).slice( - 8)
        }
    };
    var UUid = {
        ecookie: new MBrowserUUid.Evercookie({
            tests: 0
        }),
        fp: new MBrowserUUid.Fingerprint2(),
        hasLoad: false,
        jsonpID: 1,
        ajaxJsonp: function(options) {
            var source = this;
            var callbackName = "MjsonpUUid" + (++source.jsonpID);
            var script = document.createElement("script");
            var cleanup = function() {
                source.removeElement(script);
                delete window[callbackName]
            };
            var abort = function() {
                cleanup()
            };
            window[callbackName] = function(data) {
                options.callback.call(source, data);
                cleanup()
            };
            script.onerror = function() {
                if (options.callbackError) {
                    options.callbackError.call(source)
                }
            };
            script.onload = function() {
                abort()
            };
            script.src = options.url + "&callbackName=" + callbackName;
            document.getElementsByTagName("head")[0].appendChild(script)
        },
        removeElement: function(_element) {
            var _parentElement = _element.parentNode;
            if (_parentElement) {
                _parentElement.removeChild(_element)
            }
        },
        getCookie: function(name) {
            var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
            arr = document.cookie.match(reg);
            if (arr) {
                return unescape(arr[2])
            } else {
                return null
            }
        },
        runUUid: function(func, souce) {
            var that = this;
            that.ecookie.get("M_Identification",
            function(value) {
                var M_IdentificationCookie = that.getCookie("M_Identification");
                if (!value) {
                    that.fp.get(function(result) {
                        that.ajaxJsonp({
                            url: "//mapi.m.jd.com/ident/send.action?fingerprint=" + result,
                            callback: function(data) {
                                if (data && data.code == 0 && data.M_Identification) {
                                    that.ecookie.set("M_Identification", data.M_Identification);
                                    var s = souce ? null: souce;
                                    func && func.call(s, data)
                                }
                            },
                            callbackError: function() {
                                var d = {
                                    code: -1,
                                    M_Identification: ""
                                };
                                var s = souce ? null: souce;
                                func && func.call(s, d)
                            }
                        })
                    })
                } else {
                    if (!M_IdentificationCookie && value) {
                        that.ajaxJsonp({
                            url: "//mapi.m.jd.com/ident/resend.action?M_Identification=" + value,
                            callback: function(data) {
                                if (data && data.code == 0 && data.M_Identification) {
                                    that.ecookie.set("M_Identification", data.M_Identification);
                                    var s = souce ? null: souce;
                                    func && func.call(s, data)
                                }
                            },
                            callbackError: function() {
                                var d = {
                                    code: -1,
                                    M_Identification: ""
                                };
                                var s = souce ? null: souce;
                                func && func.call(s, d)
                            }
                        })
                    } else {
                        var data = {
                            code: 0,
                            M_Identification: value
                        };
                        var s = souce ? null: souce;
                        func && func.call(s, data)
                    }
                }
            },
            1)
        },
        getUUidRecursion: function(func, souce, num) {
            var that = this;
            num = num ? num: 0;
            if (that.hasLoad) {
                that.runUUid(func, souce)
            } else {
                setTimeout(function() {
                    if (that.hasLoad) {
                        that.runUUid(func, souce)
                    } else {
                        setTimeout(function() {
                            num++;
                            if (num < 20) {
                                that.getUUidRecursion(func, souce, num)
                            } else {
                                that.hasLoad = true;
                                that.getUUidRecursion(func, souce, num)
                            }
                        },
                        50)
                    }
                },
                50)
            }
        },
        getUUid: function(func, souce) {
            var that = this;
            var i = 1;
            that.getUUidRecursion(func, souce, i)
        },
        initUUid: function() {
            var that = this;
            that.fp.get(function(result) {
                that.ecookie.get("M_Identification",
                function(value) {
                    var M_IdentificationCookie = value ? value: "";
                    that.ajaxJsonp({
                        url: "//mapi.m.jd.com/ident/send.action?M_Identification=" + M_IdentificationCookie + "&fingerprint=" + result,
                        callback: function(data) {
                            if (data && data.code == 0 && data.M_Identification) {
                                that.ecookie.set("M_Identification", data.M_Identification);
                                that.hasLoad = true
                            }
                        }
                    })
                })
            })
        }
    };
    UUid.initUUid();
    window.addEventListener("beforeunload",
    function() {
        UUid.ecookie.get("M_Identification",
        function(value) {})
    },
    false);
    global.MIdentification = {
        getUUid: function() {
            UUid.getUUid.apply(UUid, arguments)
        }
    }
})(window);